home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / array / createstring.c < prev    next >
C/C++ Source or Header  |  2001-05-12  |  337b  |  24 lines

  1.  
  2. #include "tek/array.h"
  3.  
  4. /* 
  5. **    TEKlib
  6. **    (C) 2001 TEK neoscientists
  7. **    all rights reserved.
  8. **
  9. **    string = TCreateString(TAPTR mmu, TUINT numchars)
  10. **
  11. **    create dynamic string.
  12. **
  13. */
  14.  
  15. TSTRPTR TCreateString(TAPTR mmu, TUINT numchars)
  16. {
  17.     TSTRPTR str = TCreateArray(mmu, 1, numchars + 1, TNULL);
  18.     if (str)
  19.     {
  20.         *str = 0;
  21.     }
  22.     return str;
  23. }
  24.